<?php
// +---------------------------------------------------------------------+
// | OneBase    | [ WE CAN DO IT JUST THINK ]                            |
// +---------------------------------------------------------------------+
// | Licensed   | http://www.apache.org/licenses/LICENSE-2.0 )           |
// +---------------------------------------------------------------------+
// | Author     | Bigotry <3162875@qq.com>                               |
// +---------------------------------------------------------------------+
// | Repository | https://gitee.com/Bigotry/OneBase                      |
// +---------------------------------------------------------------------+

namespace app\api\controller;



use app\common\model\ArticleCategory;
use app\common\model\ForumBbs;
use app\common\model\ForumBbsCategory;
use app\common\model\ForumBbsLevel;

/**
 * Bbs控制器
 */
class Bbs extends ApiBase
{





    /**
     * 资讯分类接口
     */
    public function article_cate(){

        return $this->apiReturn(ArticleCategory::all(['status'=>1,'type'=>$this->param['type']]));
    }


    /**
     * 置顶头条
     */
    public function bbs_article(){
        return $this->apiReturn($this->logicBbs->bbs_article($this->param));
    }

    /**
     * 知识头条
     */
    public function bbs_article_search(){
        return $this->apiReturn($this->logicBbs->bbs_article_search($this->param));
    }

    /**
     * 知识库首页
     */
    public function bbs_knowledge_base(){
        return $this->apiReturn($this->logicBbs->bbs_knowledge_base($this->param));
    }

    /**
     * 他的文章
     */
    public function article_user(){
        return $this->apiReturn($this->logicBbs->article_user($this->param));
    }























    /***
     * 论坛中心
     */
    public function  bbs_center(){

        return $this->apiReturn($this->logicBbs->bbs_center($this->param));


    }

    /**
     * 发布话题接口
     */
    public function issue_topic(){
        return $this->apiReturn($this->logicBbs->issue_topic($this->param));
    }

    /**
     * 话题分类接口
     */
    public function issue_cate(){
        return $this->apiReturn(ForumBbsCategory::all(['status'=>1]));
    }

    /**
     * 话题分类接口
     */
    public function issue_level(){
        return $this->apiReturn(ForumBbsLevel::all(['status'=>1]));
    }

    /***
     * 帖子列表
     */
    public function  bbs_center_list(){

        return $this->apiReturn($this->logicBbs->bbs_center_list($this->param));


    }

    /**
     * 帖子详情
     */
    public function bbs_info(){
        return $this->apiReturn($this->logicBbs->bbs_info($this->param));
    }

    /***
     * 回帖
     */
    public function  reply_bbs(){

        return $this->apiReturn($this->logicBbs->reply_bbs($this->param));


    }
    /***
     * 帖子赞
     */
    public function  bbs_zan(){

        return $this->apiReturn($this->logicBbs->bbs_zan($this->param));


    }


    /***
     * 回帖赞
     */
    public function  bbs_comment_zan(){

        return $this->apiReturn($this->logicBbs->bbs_comment_zan($this->param));


    }


    /***
     * 关注用户/取消关注
     */
    public function  bbs_follow(){

        return $this->apiReturn($this->logicBbs->bbs_follow($this->param));


    }






    /**
     * 用户通知列表接口
     */
    public function bbs_notice(){
        return $this->apiReturn($this->logicBbs->bbs_notice($this->param));
    }

    /**
     * 用户通知列表接口
     */
    public function clear_bbs_notice(){
        return $this->apiReturn($this->logicBbs->clear_bbs_notice($this->param));
    }

    /**
     * 用户主页
     */
    public function user_homepage(){

        return $this->apiReturn($this->logicBbs->user_homepage($this->param));

    }

    /**
     * 我的帖子/他的帖子
     */
    public function my_bbs(){

        return $this->apiReturn($this->logicBbs->my_bbs($this->param));

    }

    /**
     * 我的回帖
     */
    public function my_bbs_comment(){

        return $this->apiReturn($this->logicBbs->my_bbs_comment($this->param));

    }

    /**
     * 我的关注
     */
    public function my_follow(){

        return $this->apiReturn($this->logicBbs->my_follow($this->param));

    }

    /**
     * 正在关注
     */
    public function follow_user(){

        return $this->apiReturn($this->logicBbs->follow_user($this->param));

    }


    /**
     * 获取可用钱包流水详情
     */
    public function vailable_account_log_detail(){

        return $this->apiReturn($this->logicBbs->vailable_account_log_detail($this->param));

    }

    /**
     * 获取可用钱包首页详情
     */
    public function vailable_account_index(){

        return $this->apiReturn($this->logicBbs->vailable_account_index($this->param));

    }



}
